package cn.wolfcode.feign;

import cn.wolfcode.common.web.Result;
import cn.wolfcode.domain.PayLog;
import cn.wolfcode.domain.PayVo;
import cn.wolfcode.domain.RefundVo;
import cn.wolfcode.feign.fallback.AlipyFeignApiFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletResponse;
import java.util.Map;

@FeignClient(value = "pay-service",fallback = AlipyFeignApiFallBack.class)
public interface AlipyFeignApi {

    // 在线支付
    @RequestMapping("/alipay/payOnline")
    Result<String> payOnline(@RequestBody PayVo payVo);


    // 用于支付宝回调的 验签操作
    @RequestMapping("/alipay/checkSign")
    Result<Boolean> checkSign(@RequestBody Map<String, String> params);

    // 支付宝退款
    @RequestMapping("/alipay/refund")
    Result<Boolean> refund(@RequestBody RefundVo refundVo);
}
